<div class="main">
    <div>
        <a class="header-button" [routerLink]="['/home']" routerLinkActive="active">返回首页</a>
    </div>
    <div class="monaco-wrapper">
        <nz-code-editor class="editor" [(ngModel)]="code" [nzLoading]="!pyodideLoaded || !editorLoaded"
            [nzEditorOption]="{ language: 'python', fontSize: 24, wordWrap: 'on' }"
            (nzEditorInitialized)="onEditorInit($event)"></nz-code-editor>
    </div>
    <nz-modal [(nzVisible)]="isRunModalVisible" nzTitle="运行" [nzCancelText]="null" [nzOkLoading]="codeRunning"
        (nzOnOk)="onRunModalOk()" (nzOnCancel)="onRunModalCancel()" [nzMask]="false" nzAutofocus="ok">
        <ng-container *nzModalContent>
            <div class="output" [innerText]="output" [ngClass]="runModalOutputStyle"></div>
        </ng-container>
    </nz-modal>
</div>
